import request from '@/config/axios'

export interface AssetValetVO {
  id: number
  userId: number
  name: string
  mobile: string
  picPath: string
  status: number
}

// 查询资产维修员分页
export const getAssetValetPage = async (params) => {
  return await request.get({ url: `/eam/asset-valet/page`, params })
}

// 查询资产维修员详情
export const getAssetValet = async (id: number) => {
  return await request.get({ url: `/eam/asset-valet/get?id=` + id })
}

// 新增资产维修员
export const createAssetValet = async (data: AssetValetVO) => {
  return await request.post({ url: `/eam/asset-valet/create`, data })
}

// 修改资产维修员
export const updateAssetValet = async (data: AssetValetVO) => {
  return await request.put({ url: `/eam/asset-valet/update`, data })
}

// 删除资产维修员
export const deleteAssetValet = async (id: number) => {
  return await request.delete({ url: `/eam/asset-valet/delete?id=` + id })
}

// 导出资产维修员 Excel
export const exportAssetValet = async (params) => {
  return await request.download({ url: `/eam/asset-valet/export-excel`, params })
}